package com.yysoft.core.web.model;

public class YYException extends RuntimeException {
	
	private static final long serialVersionUID = 1L;
	
	private int errorCode = 0;
	
	public YYException(String errorString) {
		this(99, errorString);
	}
	
	public YYException(int errorCode, String errorString) {
		super(errorString);
		this.errorCode = errorCode;
	}
	
	public YYException(String errorString, Throwable cause) {
		this(99, errorString, cause);
	}
	
	public YYException(int errorCode, String errorString, Throwable cause) {
		super(errorString, cause);
		this.errorCode = errorCode;
	}

	public int getErrorCode() {
		return this.errorCode;
	}

	public String getErrorMessage() {
		return this.getMessage();
	}

}
